package observer;

public class Heart {
	private int pressure = 0;
	private ObserverHeart people;
	
	public int getPressure() {
		return pressure;
	}

	public void upPressure() {
		pressure++;
		System.out.println("increase pressure "+pressure);
		if(pressure>2){
			people.killPeople();
		}
	}

	public void setPressure(int pressure) {
		this.pressure = pressure;
	}

	public ObserverHeart getPeople() {
		return people;
	}

	public void setPeople(ObserverHeart people) {
		this.people = people;
	}
}
